<div class="alunos form">
<?php echo $this->Form->create('Aluno'); ?>
	<fieldset>
		<legend><?php echo __('Localizar Cadastro'); ?></legend>
	<?php
                echo $this->Form->input('Pessoa.cpf', array('label' => 'CPF', 'id' => 'cpf_busca_pessoa', 'class' => 'cpf'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Localizar')); ?>
    
<?php if(!empty($alunos)){?>
    
<table cellpadding="0" cellspacing="0">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('pessoa_id', 'Nome'); ?></th>
                        <th><?php echo $this->Paginator->sort('Pessoa.cpf', 'CPF'); ?></th>
                        <th><?php echo $this->Paginator->sort('Pessoa.email', 'Nome'); ?></th>
                        <th><?php echo $this->Paginator->sort('Pessoa.sexo', 'Sexo'); ?></th>
                        <th><?php echo $this->Paginator->sort('Aluno.ativo', 'Ativo'); ?></th>
			<th class="actions"><?php echo __('Ações'); ?></th>
	</tr>
	</thead>
	<tbody>
	<?php foreach ($alunos as $aluno): ?>
	<tr>
		<td><?php echo h($aluno['Pessoa']['nome']); ?>&nbsp;</td>
                <td><?php echo h($this->Formatter->formatarCPF($aluno['Pessoa']['cpf'])); ?>&nbsp;</td>
                <td><?php echo h($aluno['Pessoa']['email']); ?>&nbsp;</td>
                <td><?php echo $aluno['Pessoa']['sexo'] == 'M' ? 'Masculino' : 'Feminino'; ?>&nbsp;</td>
                <td><?php echo $aluno['Aluno']['ativo'] == 'S' ? 'Sim' : 'Não'; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Detalhar'), array('action' => 'view', $aluno['Aluno']['id'])); ?>
			<?php echo $this->Html->link(__('Editar'), array('action' => 'edit', $aluno['Aluno']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</tbody>
	</table>
<?php } ?>
    
</div>
<div class="actions">
	<h3><?php echo __('Ações'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('Listar Alunos'), array('action' => 'index')); ?></li>
	</ul>
</div>
